﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class CategoryList : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
            if (!Page.IsPostBack)
            { try
              {
                ///数据绑定
                DbAccess db = new DbAccess();
                DataSet ds = db.GetDataSet("select * from Category");//获取分类
                dlstCategory.DataSource = ds.Tables[0].DefaultView;
                dlstCategory.DataBind();
              }
            catch (Exception ep)
              { 
              }
        }
        
    }
}
